package com.xingzhe.pengji.security.sql.common;

import java.util.Properties;

import com.xingzhe.pengji.framework.util.PropertiesReaderUtil;

/**
 * @Title ： 三江学院 毕业设计
 * @Description ：
 * @author ：LuFengLiang
 * @Company: IT行者工作室
 * @Copyright: Copyright (c) 2012-2-24
 * @version ： 1.0
 */
public class Enums
{
    static
    {
        PropertiesReaderUtil.init("tn.properties");
    }

    private static Properties pro = PropertiesReaderUtil.getPro();

    private static final String userTableName = pro.getProperty("USER_TABLE_NAME");
    private static final String groupTableName = pro.getProperty("GROUP_TABLE_NAME");
    private static final String resourceTableName = pro.getProperty("RESOURCE_TABLE_NAME");
    private static final String authoriteTableName = pro.getProperty("AUTHORITE_TABLE_NAME");

    /**
     * 默认的分页个数
     */
    public static final int DEFAULT_PAGE_SIZE = Integer.valueOf(pro.getProperty("DEFAULT_PAGE_SIZE"));

    public enum TableName
    {

        USER("USER", userTableName), GROUP("GROUP", groupTableName), RESOURCE("RESOURCE", resourceTableName), AUTHORITE(
                "AUTHORITE", authoriteTableName);

        String value = null;
        String desc = null;

        public String getValue()
        {
            return value;
        }

        public void setValue(String value)
        {
            this.value = value;
        }

        public String getDesc()
        {
            return desc;
        }

        public void setDesc(String desc)
        {
            this.desc = desc;
        }

        TableName(String value, String desc)
        {
            this.value = value;
            this.desc = desc;
        }
    }

}
